﻿@page "{channelindex?}"
@using Cybertron.Tag
@inject Cybertron.Tag.ICmsTag cms
@{
    string _channelindex = RouteData.Values["channelindex"].ToString();
    int siteid = (int)ViewBag.SiteId;
    var channel = cms.channel.get(_channelindex, siteid);
    var path_nodes = cms.channel.deepnodes(channel.deeppath).OrderBy(m=>m.id).ToList();
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Pragma" content="no-cache">
    <title>@Html.Raw(string.IsNullOrEmpty(channel.seo_description) ? channel.name : channel.seo_description)</title>
    <meta name="keywords" content="@channel.seo_keywords" />
    <meta name="description" content="@channel.seo_description" />
    <link rel="stylesheet" type="text/css" href="/templates/hongyuan/css/index.min.css" />
</head>
<body>
    <div class="m-head">
        <a href="/" class="u-logo"></a>
        <div class="u-menu">
            <span></span>
            <b></b>
        </div>
        <div class="u-language">
            <a href="/">中</a><b>·</b><a href="en">EN</a>
        </div>
        @Html.Partial("include/search", 0)
    </div>
    <div class="u-search-box">
        @Html.Partial("include/msearch", 0)
    </div>
    @Html.Partial("include/nav", 0)
    <div class="m-banner">
        <img src="@channel.ext1" alt="" class="pc-banner">
        <img src="@channel.ext2" alt="" class="mib-banner">
        <img src="@channel.ext3" alt="" class="banner-text">
    </div>
    <div class="m-crumbs">
        <a href="/">Home</a>
        @{ 
            foreach (var node in path_nodes) {
                    <b>·</b>
                <a href="@node.url[0]" target="@node.target"  class="z-current">@node.name </a>
            }
        }
        <b>·</b>
        <a href="javascript:;" class="z-current">@channel.name</a>
    </div>
    <div class="m-content">
        @Html.Raw(channel.content)
    </div>
    @Html.Partial("include/foot",0)
    <script src="/templates/hongyuan/js/all.min.js" type="text/javascript" charset="utf-8"></script>
    <script>(function($) {
            window.scrollReveal = new scrollReveal({
                enter: 'bottom',
                after: '0.3s',
                reset: false,
                move: '100px'
            });
})();</script>
</body>
</html>
